package thread;
public class ThreadDemo10 {
    public static void main(String[] args) {
        // 启动两个线程
        Thread t1 = new Thread(()->{
            // 这个线程的运行时间大概是1秒
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        });
        Thread t2 = new Thread(()->{
            // 这个线程的运行时间大概是1秒
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        });
        t1.start();
        t2.start();
    }
}
